package com.kuaidian.service;

import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.kuaidian.dao.TPhotoDaoMapper;
import com.kuaidian.pojo.Row;
import com.kuaidian.pojo.TPhoto;

@Service
public class PhotoService {

    private static Logger logger = Logger.getLogger(PhotoService.class);  
	
    @Autowired
    private TPhotoDaoMapper tPhotoDaoMapper;
    

	public int insertPhoto(TPhoto photo) {
		return tPhotoDaoMapper.insertPhoto(photo);
	}


	public List<Row> selectHomepage(Integer user_id,Integer startRow, Integer pageSize) {
		return tPhotoDaoMapper.selectHomepage(user_id, startRow, pageSize);
		
	}


	public List<TPhoto> queryPhotos(TPhoto photo, int startRow, Integer pageSize) {
		return tPhotoDaoMapper.queryPhotos(photo, startRow, pageSize);
	}
	
	public int countPhotos(TPhoto photo) {
		return tPhotoDaoMapper.countPhotos(photo);
	}


	public int deletePhoto(TPhoto photo) {
		return tPhotoDaoMapper.deletePhoto(photo);
	}

	   
}
